package com.example.exercise.analysis.datagenerator.controller;

import com.example.exercise.core.base.dto.BaseResponse;
import com.example.exercise.analysis.datagenerator.service.AppStartTestService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 添加测试数据
 */
@RestController
@RequestMapping("/appDataCollect")
//@Api(description = "添加测试数据")
public class AppDataCollectController {

    @Resource
    private AppStartTestService testService;

    @RequestMapping(value = "/insertDataOrigin", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
//    @ApiOperation(value = "添加原始数据", notes = "添加原始数据")
    public BaseResponse<Object> insertDataOrigin() {
        BaseResponse<Object> baseResponse = new BaseResponse<>();
        testService.truncateTable();
        testService.insertDataOrigin();
        baseResponse.ok();
        return baseResponse;
    }

}
